$(document).ready(function(){
	$('.calendar .day').click(function(){
		day_num = $(this).find('.cal_day').html();
		data = prompt('Enter Event');
		time = prompt('Insert Time');
		
		if(data != null){
			$.ajax({
				url: window.location,
				type: 'POST',
				data: {
					day: day_num,
					event: data,
					event_time: time
				},
				success: function(msg){
					location.reload();
				}
			});
		}
	});
});